Skip to content

Add a new documentation page for WithContainerFiles and PublishWithContainerFiles#400

Open
danegsta wants to merge 2 commits intomainfrom
danegsta/containerFiles
Open

Add a new documentation page for WithContainerFiles and PublishWithContainerFiles#400
danegsta wants to merge 2 commits intomainfrom
danegsta/containerFiles

Conversation

@danegsta
Copy link
Member

Fixes #343

@danegsta danegsta requested a review from eerhardt February 11, 2026 22:26
Copilot AI review requested due to automatic review settings February 11, 2026 22:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new AppHost documentation page that explains Aspire’s container file APIs (WithContainerFiles and PublishWithContainerFiles) and links it into the left-nav sidebar.

Changes:

  • New app-host/container-files MDX page documenting development-time file injection and publish-time file copying.
  • Added “Container files” entry to the AppHost section in the docs sidebar.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
src/frontend/src/content/docs/app-host/container-files.mdx New documentation page describing container file APIs, permissions/ownership, and examples.
src/frontend/config/sidebar/docs.topics.ts Adds the new page to the AppHost sidebar navigation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +181 to +189
```csharp title="AppHost.cs"
new ContainerDirectory
{
Name = "assets",
Entries = ContainerDirectory.GetFileSystemItemsFromPath(
"/path/to/assets",
searchOptions: SearchOption.AllDirectories)
}
```
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This snippet constructs a ContainerDirectory as a standalone expression without a semicolon/assignment, so it’s not valid C# as-is. Add a semicolon or show the object initializer in a containing statement to keep examples copy/paste runnable.

Copilot uses AI. Check for mistakes.
Comment on lines +122 to +136
```csharp title="AppHost.cs"
// File with inline contents
new ContainerFile
{
Name = "config.yaml",
Contents = "key: value"
}

// File sourced from the host file system
new ContainerFile
{
Name = "data.csv",
SourcePath = "/path/to/data.csv"
}
```
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This C# snippet shows standalone new ContainerFile { ... } expressions without terminating semicolons or assigning them to variables/collections, so it won’t compile as written. Consider adding semicolons or wrapping the examples in a containing statement (e.g., an array/collection initializer) to make the snippet copy/paste runnable.

Copilot uses AI. Check for mistakes.
Comment on lines +140 to +147
```csharp title="AppHost.cs"
new ContainerFile
{
Name = "optional-config.json",
Contents = "{}",
ContinueOnError = true
}
```
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ContinueOnError example is a standalone object creation expression without a semicolon/assignment, so it won’t compile if copied directly. Add a semicolon or show it in a context (e.g., assigned to a variable or included in an Entries/collection expression).

Copilot uses AI. Check for mistakes.
Comment on lines +153 to +177
```csharp title="AppHost.cs"
new ContainerDirectory
{
Name = "certs",
Entries = [
new ContainerFile
{
Name = "ca.pem",
SourcePath = "/path/to/ca.pem"
},
new ContainerDirectory
{
Name = "private",
Entries = [
new ContainerFile
{
Name = "server.key",
SourcePath = "/path/to/server.key",
Mode = UnixFileMode.UserRead
}
]
}
]
}
```
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ContainerDirectory example is presented as a top-level expression without a trailing semicolon or assignment, which makes the snippet invalid C# when copied. Add a semicolon or demonstrate it as part of a WithContainerFiles(..., [ ... ]) call.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[What's New Analysis] Document WithContainerFiles API

1 participant